package com.sendinfo.sso;

import java.util.Map;

import com.opensymphony.xwork.ActionContext;

public abstract class SessionContext {
	/*
	 * 校验码
	 */
	public static final String CHECKCODE = "checkcode";
	public static final String CHECKCODE_LOGIN = "CHECKCODE_LOGIN";

	/* 统一认证Session常量 */
	public static enum LoginDomain {
		TICKET(true), TICKET_MANAGE(false), MERCHANT(false), PARK_MANAGE(false), ZUOUO(true), DISTRIBUTORS(true);

		private boolean sso = false;

		LoginDomain(boolean sso) {
			this.sso = sso;
		}

		public boolean ssoEnable() {
			return this.sso;
		}
	}

	public static final String CURRENT_LOGIN = "login_id";
	public static final String CURRENT_LOGIN_DOMAIN = "login_domain";
	public static final String CURRENT_LOGIN_REDIRECT = "login_redirect";

	@SuppressWarnings("unchecked")
	public static Map<String, Object> getSession() {
		return ActionContext.getContext().getSession();
	}
}
